package com.yourname.projectname.util;

import org.apache.commons.codec.digest.DigestUtils;

public class PwdUtil {

    /**
     * 对明文密码进行加密
     * @param pwd
     * @return
     */
    public static String PwdWithSalt(String pwd) {
        StringBuilder sb = new StringBuilder(pwd);
        sb.insert(0,'n').insert(2,'a').insert(4,'m').insert(6,'e');
        return DigestUtils.md5Hex(sb.toString());
    }
}